package com.ruoyi.fep.domain;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 订单对象 fep_orders
 * 
 * @author zj
 * @date 2023-04-12
 */
public class Orders extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long orderId;

    /** 订单号 */
    @Excel(name = "订单号")
    private String orderNo;

    /** 用户ID */
    @Excel(name = "用户ID")
    private Long buyerId;

    /** 总价 */
    @Excel(name = "总价")
    private BigDecimal totalPrice;

    /** 已支付 */
    @Excel(name = "已支付")
    private BigDecimal paidAmount;

    /** 未支付 */
    @Excel(name = "未支付")
    private BigDecimal upaidAmount;

    /** 品种数 */
    @Excel(name = "品种数")
    private Long quantity;

    /** 是否结清 */

    @Excel(name = "是否结清",readConverterExp = "0=结清,1=未结清")
    private Long isSettle;

    /** 下单时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "下单时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date orderTime;


    /** 当前订单属于那个消费者的 */
    @Excel(name = "姓名")
    private Buyers buyers;

    /** 该订单下包含几种产品*/
    @Excel(name = "产品")
    private List<OrdersDetails> ordersDetailsList;

    /** 该订单付款了几次*/
    @Excel(name = "付款情况")
    private List<Installments> installmentsList;

    public List<OrdersDetails> getOrdersDetailsList() {
        return ordersDetailsList;
    }

    public void setOrdersDetailsList(List<OrdersDetails> ordersDetailsList) {
        this.ordersDetailsList = ordersDetailsList;
    }

    public List<Installments> getInstallmentsList() {
        return installmentsList;
    }

    public void setInstallmentsList(List<Installments> installmentsList) {
        this.installmentsList = installmentsList;
    }

    public Buyers getBuyers() {
        return buyers;
    }

    public void setBuyers(Buyers buyers) {
        this.buyers = buyers;
    }


    public void setOrderId(Long orderId) 
    {
        this.orderId = orderId;
    }

    public Long getOrderId() 
    {
        return orderId;
    }
    public void setOrderNo(String orderNo) 
    {
        this.orderNo = orderNo;
    }

    public String getOrderNo() 
    {
        return orderNo;
    }
    public void setBuyerId(Long buyerId) 
    {
        this.buyerId = buyerId;
    }

    public Long getBuyerId() 
    {
        return buyerId;
    }
    public void setTotalPrice(BigDecimal totalPrice) 
    {
        this.totalPrice = totalPrice;
    }

    public BigDecimal getTotalPrice() 
    {
        return totalPrice;
    }
    public void setPaidAmount(BigDecimal paidAmount) 
    {
        this.paidAmount = paidAmount;
    }

    public BigDecimal getPaidAmount() 
    {
        return paidAmount;
    }
    public void setUpaidAmount(BigDecimal upaidAmount) 
    {
        this.upaidAmount = upaidAmount;
    }

    public BigDecimal getUpaidAmount() 
    {
        return upaidAmount;
    }
    public void setQuantity(Long quantity) 
    {
        this.quantity = quantity;
    }

    public Long getQuantity() 
    {
        return quantity;
    }
    public void setIsSettle(Long isSettle) 
    {
        this.isSettle = isSettle;
    }

    public Long getIsSettle() 
    {
        return isSettle;
    }
    public void setOrderTime(Date orderTime) 
    {
        this.orderTime = orderTime;
    }

    public Date getOrderTime() 
    {
        return orderTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("orderId", getOrderId())
            .append("orderNo", getOrderNo())
            .append("buyerId", getBuyerId())
            .append("totalPrice", getTotalPrice())
            .append("paidAmount", getPaidAmount())
            .append("upaidAmount", getUpaidAmount())
            .append("quantity", getQuantity())
            .append("isSettle", getIsSettle())
            .append("orderTime", getOrderTime())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("buyers",getBuyers())
                .append("ordersDetailsList",getOrdersDetailsList())
                .append("installmentsList",getInstallmentsList())
            .toString();
    }
}
